Class HTTPServerImpl

All Implemented Interfaces:
IPCObject, HTTPServer, Process
Direct Known Subclasses:
HTTPsServerImpl

public class HTTPServerImpl extends ProcessImpl implements HTTPServer
Information provided by the PKI file:

    \class HttpServer
    
    \brief HttpServer handles and manipulates the HTTP server on devices.
    
    \example network().getDevice("Server0").getProcess("HttpServer")
    
Author:
Auto-generated
  • Constructor Details

  • Method Details

    • setPortNumber

      public void setPortNumber(Short port)
      Information provided by the PKI file:
      
          \brief Sets the port number of the HTTP service.
          
          \param num, the port number to set the HTTP service to.
          
              
      Specified by:
      setPortNumber in interface HTTPServer
      Parameters:
      port - Takes in a parameter of port
    • getPortNumber

      public Short getPortNumber()
      Information provided by the PKI file:
      
          \brief Returns the port number of the HTTP service.
          
          \return int, the port number of the HTTP service.
          
              
      Specified by:
      getPortNumber in interface HTTPServer
      Returns:
      Short Returns a Short
    • setEnable

      public void setEnable(boolean bEnable)
      Information provided by the PKI file:
      
          \brief Enables or disables the HTTP service.
          
          \param bEnable, true to enable the HTTP service, false to disable it.
          
              
      Specified by:
      setEnable in interface HTTPServer
      Parameters:
      bEnable - Takes in a parameter of bEnable
    • isEnabled

      public boolean isEnabled()
      Information provided by the PKI file:
      
          \brief Returns true if the HTTP service is enabled, otherwise false.
          
          \return bool, true if the HTTP service is enabled, otherwise false.
          
              
      Specified by:
      isEnabled in interface HTTPServer
      Returns:
      boolean Returns a boolean
    • getPage

      public String getPage(String url)
      Information provided by the PKI file:
      
          \brief Returns the page contents at the specified URL.
          
          \param url, the URL of the page of interest.
          
          \return string, the page contents at the specified URL.
          
              
      Specified by:
      getPage in interface HTTPServer
      Parameters:
      url - Takes in a parameter of url
      Returns:
      String Returns a String
    • setPageContents

      public void setPageContents(String url, String contents)
      Information provided by the PKI file:
      
          \brief Sets the page contents at the specified URL.
          
          \param url, the URL of the page of interest.
          \param contents, the contents of the page of interest.
          
              
      Specified by:
      setPageContents in interface HTTPServer
      Parameters:
      url - Takes in a parameter of url
      contents - Takes in a parameter of contents
    • getUsername

      public String getUsername()
      Information provided by the PKI file:
      
          \brief Returns the htaccess username for the HTTP server.
          
          \return string, the htaccess username for the HTTP server.
          
              
      Specified by:
      getUsername in interface HTTPServer
      Returns:
      String Returns a String
    • getPassword

      public String getPassword()
      Information provided by the PKI file:
      
          \brief Returns the htaccess password for the HTTP server.
          
          \return string, the htaccess password for the HTTP server.
          
              
      Specified by:
      getPassword in interface HTTPServer
      Returns:
      String Returns a String
    • setUsername

      public void setUsername(String username)
      Information provided by the PKI file:
      
          \brief Sets the htaccess username for the HTTP server.
          
          \param username, the htaccess username for the HTTP server.
          
              
      Specified by:
      setUsername in interface HTTPServer
      Parameters:
      username - Takes in a parameter of username
    • setPassword

      public void setPassword(String password)
      Information provided by the PKI file:
      
          \brief Sets the htaccess password for the HTTP server.
          
          \param password, the htaccess password for the HTTP server.
          
              
      Specified by:
      setPassword in interface HTTPServer
      Parameters:
      password - Takes in a parameter of password